﻿@* 
Project: Aguafrommars/TheIdServer
Copyright (c) 2022 @Olivier Lefebvre
*@
@inject IViewLocalizer Localizer

@model LoggedOutViewModel

@{
    // set this so the layout rendering sees an anonymous user
    ViewData["signed-out"] = true;
}

<div class="page-header logged-out">
    <h1>
        @Localizer["Logout"]
        <small>@Localizer["You are now logged out"]</small>
    </h1>

    @if (Model.PostLogoutRedirectUri != null)
    {
        <div>
            @Localizer["Click <a class=\"PostLogoutRedirectUri\" href=\"{0}\">here</a> to return to the <span>{1}</span> application.", Model.PostLogoutRedirectUri, Model.ClientName]
        </div>
    }

    @if (Model.SignOutIframeUrl != null)
    {
        <iframe title="signout" width="0" height="0" class="signout" src="@Model.SignOutIframeUrl"></iframe>
    }
</div>

@section scripts
{
    @if (Model.AutomaticRedirectAfterSignOut)
    {
        <script src="~/js/signout-redirect.js"></script>
    }
}
